package com.softer.wxzj.mapper;

import com.github.pagehelper.PageInfo;
import com.softer.wxzj.common.entity.Page;
import com.softer.wxzj.entity.BaseBankInfo;
import com.softer.wxzj.entity.RegionBank;
import com.softer.wxzj.entity.StatisticalReportForms;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.math.BigDecimal;
import java.util.List;

/**
 * @author Niu
 * @create 2019/11/11 - 15:41 - 星期一
 */
@Repository
public interface StatisticalReportFormsMapper {

    /**
     * 综合查询
     *
     * @param zoneCode  区域
     * @param houseAttr 房屋性质
     * @param houseUse  房屋用途
     * @return
     */
    List<StatisticalReportForms> wholeCityComprehensiveQueryBasic(@Param("zoneCode") String zoneCode, @Param("houseAttr") String houseAttr, @Param("houseUse") String houseUse);

    /**
     * 直用信息查询
     *
     * @param zoneCode
     * @param houseAttr
     * @param houseUse
     * @return
     */
    List<StatisticalReportForms> statisticalReportFormsDisburse(@Param("zoneCode") String zoneCode, @Param("houseAttr") String houseAttr, @Param("houseUse") String houseUse);

    /**
     * 质保金查询
     *
     * @param zoneCode
     * @param houseAttr
     * @param houseUse
     * @return
     */
    List<StatisticalReportForms> statisticalReportFormsPremium(@Param("zoneCode") String zoneCode, @Param("houseAttr") String houseAttr, @Param("houseUse") String houseUse);

    /**
     * 质保金返还额
     *
     * @param zoneCode
     * @param houseAttr
     * @param houseUse
     * @return
     */
    List<StatisticalReportForms> statisticalReportFormsPremiumReutrn(@Param("zoneCode") String zoneCode, @Param("houseAttr") String houseAttr, @Param("houseUse") String houseUse);

    /**
     * 小区交存业务查询
     *
     * @param zoneCode
     * @param fuzzy
     * @return
     */
    List<StatisticalReportForms> depositBusinessQuery(@Param("zoneCode") String zoneCode, @Param("fuzzy") String fuzzy);

    /**
     * 小区交存业务查询==》查看
     *
     * @param fuzzy
     * @param no    交存编号
     * @return
     */
    List<StatisticalReportForms> depositDetails(@Param("fuzzy") String fuzzy, @Param("no") String no, @Param("buildId") String buildId);

    /**
     * 小区交存业务查询==》查看(zongji)
     *
     * @param fuzzy
     * @param no    交存编号
     * @return
     */
    List<StatisticalReportForms> depositDetailsAll(@Param("fuzzy") String fuzzy, @Param("no") String no, @Param("buildId") String buildId);

    /**
     * 小区欠费信息查询
     *
     * @param zoneCode
     * @param fuzzy
     * @return
     */
    List<StatisticalReportForms> arrearsInquiries(@Param("zoneCode") String zoneCode, @Param("fuzzy") String fuzzy);

    /**
     * 小区欠费信息查询 总合计
     *
     * @param zoneCode
     * @param fuzzy
     * @return
     */
    List<StatisticalReportForms> arrearsInquirieslistTotal(@Param("zoneCode") String zoneCode, @Param("fuzzy") String fuzzy);

    /**
     * 小区相关信息   小区交存业务信息查询 总计
     *
     * @param zoneCode
     * @param fuzzy
     * @return
     */
    List<StatisticalReportForms> depositBusinessQueryListTotal(@Param("zoneCode") String zoneCode, @Param("fuzzy") String fuzzy);

    /**
     * 小区欠费信息详情
     *
     * @param zoneCode
     * @param fuzzy
     * @return
     */
    List<StatisticalReportForms> arrearsInquiriesDetails(@Param("zoneCode") String zoneCode, @Param("fuzzy") String fuzzy, @Param("id") String id);

    StatisticalReportForms arrearsInquiriesDetailsAll(@Param("zoneCode") String zoneCode, @Param("fuzzy") String fuzzy, @Param("id") String id);

    /**
     * 小区业务汇总查询
     * 小区组
     *
     * @param statisticalReportForms
     * @return
     */
    List<StatisticalReportForms> businessSummaryQuery(StatisticalReportForms statisticalReportForms);

    /**
     * 小区业务汇总查询 总计
     * 小区楼栋房间兼容
     *
     * @param statisticalReportForms
     * @return
     */
    List<StatisticalReportForms> businessSummaryQueryTotal(StatisticalReportForms statisticalReportForms);

    /**
     * 小区业务明细查询
     * 楼栋组
     *
     * @param statisticalReportForms
     * @return
     */
    List<StatisticalReportForms> businessDetailsQuery(StatisticalReportForms statisticalReportForms);

    StatisticalReportForms businessDetailsQueryAll(StatisticalReportForms statisticalReportForms);

    /**
     * 小区业务明细查询
     * 房间组
     *
     * @param statisticalReportForms
     * @return
     */
    List<StatisticalReportForms> businessDetailsSee(StatisticalReportForms statisticalReportForms);

    /**
     * 银行交易汇总查询
     *
     * @param statisticalReportForms
     * @return
     */
    List<StatisticalReportForms> bankTransactionSummaryQuery(StatisticalReportForms statisticalReportForms);

    /**
     * 银行交易汇总查询  总计数据
     *
     * @param statisticalReportForms
     * @return
     */
    List<StatisticalReportForms> bankTransactionSummaryQueryTotal(StatisticalReportForms statisticalReportForms);

    /**
     * 综合查询的小区列表
     *
     * @param zoneCode
     * @param fuzzy
     * @return
     */
    List<StatisticalReportForms> wholeCityComprehensiveQueryRegion(@Param("zoneCode") String zoneCode, @Param("fuzzy") String fuzzy);

    StatisticalReportForms wholeCityComprehensiveQueryRegionAll(@Param("zoneCode") String zoneCode, @Param("fuzzy") String fuzzy);

    /**
     * 综合查询自然幢信息
     */
    List<StatisticalReportForms> wholeCityComprehensiveQueryBuild(@Param("regionId") String regionId, @Param("fuzzy") String fuzzy);

    /**
     * 综合查询房屋信息
     */
    List<StatisticalReportForms> wholeCityComprehensiveQueryHouse(@Param("buildId") String buildId, @Param("fuzzy") String fuzzy);

    StatisticalReportForms wholeCityComprehensiveQueryHouseAll(@Param("buildId") String buildId, @Param("fuzzy") String fuzzy);

    /**
     * 小区查询方式（按自然幢查询）
     *
     * @param zoneCode
     * @param fuzzy
     * @return
     */
    List<StatisticalReportForms> depositBusinessQueryBuild(@Param("zoneCode") String zoneCode, @Param("fuzzy") String fuzzy);

    List<StatisticalReportForms> depositBusinessQueryListTotalBuild(@Param("zoneCode") String zoneCode, @Param("fuzzy") String fuzzy);

    StatisticalReportForms wholeCityComprehensiveQueryBuildAll(@Param("regionId") String regionId, @Param("fuzzy") String fuzzy);

    StatisticalReportForms businessDetailsSeeAll(StatisticalReportForms statisticalReportForms);

    /**
     * 银行交易明细查询
     *
     * @param statisticalReportForms
     * @return
     */
    List<StatisticalReportForms> selectBank(StatisticalReportForms statisticalReportForms);

    /**
     * 银行交易明细查询all
     *
     * @param statisticalReportForms
     * @return
     */
    StatisticalReportForms selectBankAll(StatisticalReportForms statisticalReportForms);

    /**
     * 查询该业务编号的应交实缴状态
     *
     * @param busiNo
     * @return
     */
    List<StatisticalReportForms> selectDepByHouse(@Param("busiNo") String busiNo, @Param("fuzzy") String fuzzy);

    /**
     * 查询该业务编号的应交实缴状态
     *
     * @param busiNo
     * @return
     */
    StatisticalReportForms selectDepByHouseAll(@Param("busiNo") String busiNo, @Param("fuzzy") String fuzzy);

    /**
     * 查询该退款编号的应交实缴状态
     *
     * @param busiNo
     * @return
     */
    List<StatisticalReportForms> selectReqByHouse(@Param("busiNo") String busiNo, @Param("fuzzy") String fuzzy);

    /**
     * 查询该使用编号的应交实缴状态
     *
     * @param busiNo
     * @return
     */
    List<StatisticalReportForms> selectExpByHouse(@Param("busiNo") String busiNo, @Param("fuzzy") String fuzzy);

    StatisticalReportForms selectExpByHouseAll(@Param("busiNo") String busiNo, @Param("fuzzy") String fuzzy);

    /**
     * 银行业务明细--退款合计
     *
     * @param busiNo
     * @return
     */
    StatisticalReportForms selectReqByHouseAll(@Param("busiNo") String busiNo, @Param("fuzzy") String fuzzy);

    /**
     * 查询该月的
     *
     * @param type
     * @return
     */
    List<StatisticalReportForms> selectAllLink(String type);

    /**
     * 查询期末
     *
     * @param typeName
     * @return
     */
    StatisticalReportForms selectNowAll(@Param("typeName") String typeName);


    /**
     * 查询之前的数据
     *
     * @param type
     * @return
     */
    List<BaseBankInfo> selectRegionBankOn(@Param("type") String type, @Param("typeName") String typeName);

    /**
     * 維修资金统计报表打印
     *
     * @param date
     * @param year
     * @return
     */
    RegionBank wholeMoneyOutAndIn(@Param("date") String date, @Param("year") String year);

    /**
     * 查询银行的剩余金额
     *
     * @param date
     * @return
     */
    List<BaseBankInfo> selectBankByMoney(String date);

    /**
     * 查询期末余额
     *
     * @param date
     * @return
     */
    BigDecimal bankMoneyAll(String date);
}
